package com.guigu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 订单明细表
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@Data
@TableName("order_details")
public class OrderDetails implements Serializable {

    private static final long serialVersionUID=1L;

    //@ApiModelProperty(value = "主键，自增id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //@ApiModelProperty(value = "商品id")
    private Integer productId;

    //@ApiModelProperty(value = "所属订单id")
    private Integer ordersId;

    //@ApiModelProperty(value = "数量")
    private Integer amount;

    //@ApiModelProperty(value = "单价")
    private Float price;

    //@ApiModelProperty(value = "小计")
    private Float subtotal;

    //@ApiModelProperty(value = "退货标志")
    private String backTag;

    //@ApiModelProperty(value = "退货原因")
    private String backReason;

    //@ApiModelProperty(value = "退货状态")
    private String backState;

    @TableField(exist = false)
    private Product product;

    @TableField(exist = false)
    private Orders orders;
}
